package cn.yi.medicalsys.dao.impl;

import cn.yi.medicalsys.dao.NewsDao;
import cn.yi.medicalsys.pojo.News;
import cn.yi.medicalsys.utils.BaseDao;

public class NewsDaoImpl extends BaseDao implements NewsDao {

	@Override
	public int addNews(News news) throws Exception {
		String sql = "INSERT INTO news(ntitle,nauthor,ncreateDate,nImage,ncontent,nsummary) VALUES(?,?,?,?,?,?) ";
		Object[] params={news.getNtitle(),news.getNauthor(),news.getNcreateDate(),news.getnImage(),news.getNcontent(),news.getNsummary()};
		int rs=super.executeUpdate(sql, params);
		return rs;
	}

}
